<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<div class="tt">搜索</div>
<form action="?" method="post">
	<input type="hidden" name="file" value="<?php if (isset($file)) echo $file; ?>"/>
	<input type="hidden" name="action" value="<?php if (isset($action)) echo $action; ?>"/>
	<table cellpadding="2" cellspacing="1" class="tb">
		<tr>
			<td>
			注册日期 : <?php echo Post::calender('startDate', $startDate); ?>
			X Scale: <?php echo Post::select($xScales, 'xScale', $xScale, array('-'=>'请选择')); ?>
			Y Scale: <?php echo Post::select($yScales, 'yScale', $yScale, array('-'=>'请选择')); ?>
			Type : <?php echo Post::select($types, 'type', $type, array('-'=>'请选择')); ?>
			<input type="submit" value="更 新" class="btn"/>
			<input type="button" value="重 置" class="btn" onclick="window.location='?file={$S.file}';"/>
			</td>
		</tr>
	</table>
</form>
<div class="tt">结果</div>
<div>
	<figure style="width: 1000px; height: 500px;" id="myChart"></figure>
</div>
<script>
	seajs.use(['xChart', 'd3', 'xchart-css'], function() {
		var data = { };
		data.xScale = '<?php echo $xScale;?>';
		data.yScale = '<?php echo $yScale;?>';
		data.type = '<?php echo $type;?>';
		data.main   = [{ "className": ".pizza", "data" : <?php echo $data;?>}];
		var myChart = new xChart('<?php echo $type;?>', data, '#myChart');
	});
	xd_menuActive(0);
</script>

<?php include tpl('footer'); ?>